<template>
    <el-switch v-model="nv[fvData.fdName]" v-if="nv"></el-switch>
</template>
<script>
import { onMounted, computed } from 'vue';
export default {
  name: 'FvSwitch',
  props: {
    fvData: {
      default: null,
      type: Object
    }
  },
  setup(props) {
    const nv = computed(() => {
      return props.fvData.getNv();
    })
    onMounted(() => {
      if (nv[props.fvData.fdName] == null) { nv[props.fvData.fdName] = false; }
    })
    return {
      nv
    }
  }
}
</script>

<style>

</style>
